<%- include header %>
  <div class="container">	  
    <div class="row">
	  <div class="span8 table-style" >
	      <div class="page-header">
		    <h2>Messages <small>Manage messages</small></h2>
          </div>
	    <table class="table table-striped table-bordered table-condensed">
            <thead>
                <tr>
                    <th>标题</th>
					<th>作者</th>
					<th>发表日期</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
			  <% posts.forEach(function (post,index) { %>
                <tr>
                    <td>
                      <a href="/u/<%= post.name %>/<%= post.time.day %>/<%= post.title %>"><%=post.title%></a>
                    </td>
					<td>
                      <a href="/u/<%= post.name %>"><%=post.name%></a>
                    </td>
					<td>
                      <%=post.time.minute%>
                    </td>
					<td>
						<div class="btn-group">
							<a class="btn btn-small dropdown-toggle" data-toggle="dropdown" href="#">Actions <span class="caret"></span></a>
							<ul class="dropdown-menu pull-right">
								<li><a href="/edit/<%= post.name %>/<%= post.time.day %>/<%= post.title %>"><i class="icon-pencil"></i> Edit</a></li>
								<li><a href="/remove/<%= post.name %>/<%= post.time.day %>/<%= post.title %>"><i class="icon-trash"></i> Delete</a></li>
							</ul>
						</div>
					</td>
                </tr>
              <%})%>
            </tbody>
        </table>
	  </div>	
    </div>
  <div>
<%- include footer %>